import mysql from 'mysql';

let pool = mysql.createPool({
    "host": '127.0.0.1',
    "user": "root",
    "password": "",
    database: "xxxsystem0",
    port: "3306"
})

module.exports = {
    query: function (sql, params, fn) {
        pool.getConnection(function (err, conn) {
            if (!err) {
                conn.query(sql, params, fn);
                conn.release();
            } else {
                fn(err, null, null);
            }

        })
    }
}